<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/login.css">
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/echarts.min.js"></script>
    <script>
        let bgi = new Image();
        bgi.src = './assets/img/bearing.png'
    </script>
</head>


<body>
<div id="particles-js" style="display: flex;align-items: center;justify-content: center">
    <canvas class="particles-js-canvas-el" style="width: 100%; height: 100%;" width="472" height="625"></canvas>
</div>
<div id="indexPage">
    <p class="teamName" style="width: 700px;height: 100px;">Easterly Wind</p>
    <p class="projectNameTip animate__animated animate__fadeInUp"><img src="assets/img/logo.png" alt=""
                                                                       class="logo"><span> —— 东风集团</span></p>
    <div class="teamInfo">
        <p>声动-汽车轴承剩余寿命预测平台</p>
    </div>
    <a href="login.jsp" class="showButton animate__animated animate__fadeInUp">立即登录</a>
</div>

<script src="js/login.js"></script>
<script src="js/loginApp.js"></script>
<script>

    new Vue({
        el: '#indexPage',
        data() {
            return {}
        },
        created() {
            console.log(bgi);
            document.body.appendChild(bgi);
        },
        mounted() {
            this.initText();
        },
        methods: {
            initText() {
                // 基于准备好的dom，初始化echarts实例
                var myChart = echarts.init(document.querySelector('.teamName'));
                // 指定图表的配置项和数据
                var option = {
                    graphic: {
                        elements: [
                            {
                                type: 'text',
                                left: 'left',
                                top: 'center',
                                style: {
                                    text: 'Easterly Wind',
                                    fontSize: 90,
                                    fontWeight: 'bold',
                                    lineDash: [0, 200],
                                    lineDashOffset: 0,
                                    fill: 'transparent',
                                    stroke: '#333',
                                    lineWidth: 1
                                },
                                keyframeAnimation: {
                                    duration: 3000,
                                    keyframes: [
                                        {
                                            percent: 0.7,
                                            style: {
                                                fill: 'transparent',
                                                lineDashOffset: 200,
                                                lineDash: [200, 0]
                                            }
                                        },
                                        {
                                            percent: 0.8,
                                            style: {
                                                fill: 'transparent'
                                            }
                                        },
                                        {
                                            percent: 1,
                                            style: {
                                                fill: '#111'
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                };
                // 使用刚指定的配置项和数据显示图表。
                myChart.setOption(option);
            },
        }
    })
</script>
</body>

</html>